Optimal. Leaf size=288 \[ \frac {2 \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x) \left (a^2 (5 A+7 C)+14 a b B+4 A b^2\right )}{21 d}+\frac {2 \sin (c+d x) \sqrt {\sec (c+d x)} \left (3 a^2 B+6 a A b+10 a b C+5 b^2 B\right )}{5 d}+\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (a^2 (5 A+7 C)+14 a b B+7 b^2 (A+3 C)\right )}{21 d}-\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (3 a^2 B+6 a A b+10 a b C+5 b^2 B\right )}{5 d}+\frac {2 a (7 a B+4 A b) \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x)}{35 d}+\frac {2 A \sin (c+d x) \sec ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))^2}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.70, antiderivative size = 288, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.186, Rules used = {4221, 3047, 3031, 3021, 2748, 2636, 2639, 2641} \[ \frac {2 \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x) \left (a^2 (5 A+7 C)+14 a b B+4 A b^2\right )}{21 d}+\frac {2 \sin (c+d x) \sqrt {\sec (c+d x)} \left (3 a^2 B+6 a A b+10 a b C+5 b^2 B\right )}{5 d}+\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (a^2 (5 A+7 C)+14 a b B+7 b^2 (A+3 C)\right )}{21 d}-\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (3 a^2 B+6 a A b+10 a b C+5 b^2 B\right )}{5 d}+\frac {2 a (7 a B+4 A b) \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x)}{35 d}+\frac {2 A \sin (c+d x) \sec ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))^2}{7 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2636
Rule 2639
Rule 2641
Rule 2748
Rule 3021
Rule 3031
Rule 3047
Rule 4221
Rubi steps
\begin {align*} \int (a+b \cos (c+d x))^2 \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^{\frac {9}{2}}(c+d x) \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {(a+b \cos (c+d x))^2 \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {9}{2}}(c+d x)} \, dx\\ &=\frac {2 A (a+b \cos (c+d x))^2 \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{7 d}+\frac {1}{7} \left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {(a+b \cos (c+d x)) \left (\frac {1}{2} (4 A b+7 a B)+\frac {1}{2} (5 a A+7 b B+7 a C) \cos (c+d x)+\frac {1}{2} b (A+7 C) \cos ^2(c+d x)\right )}{\cos ^{\frac {7}{2}}(c+d x)} \, dx\\ &=\frac {2 a (4 A b+7 a B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac {2 A (a+b \cos (c+d x))^2 \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{7 d}-\frac {1}{35} \left (4 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {-\frac {5}{4} \left (4 A b^2+14 a b B+a^2 (5 A+7 C)\right )-\frac {7}{4} \left (6 a A b+3 a^2 B+5 b^2 B+10 a b C\right ) \cos (c+d x)-\frac {5}{4} b^2 (A+7 C) \cos ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 \left (4 A b^2+14 a b B+a^2 (5 A+7 C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{21 d}+\frac {2 a (4 A b+7 a B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac {2 A (a+b \cos (c+d x))^2 \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{7 d}-\frac {1}{105} \left (8 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {-\frac {21}{8} \left (6 a A b+3 a^2 B+5 b^2 B+10 a b C\right )-\frac {5}{8} \left (14 a b B+7 b^2 (A+3 C)+a^2 (5 A+7 C)\right ) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 \left (4 A b^2+14 a b B+a^2 (5 A+7 C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{21 d}+\frac {2 a (4 A b+7 a B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac {2 A (a+b \cos (c+d x))^2 \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{7 d}+\frac {1}{5} \left (\left (6 a A b+3 a^2 B+5 b^2 B+10 a b C\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)} \, dx+\frac {1}{21} \left (\left (14 a b B+7 b^2 (A+3 C)+a^2 (5 A+7 C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 \left (14 a b B+7 b^2 (A+3 C)+a^2 (5 A+7 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{21 d}+\frac {2 \left (6 a A b+3 a^2 B+5 b^2 B+10 a b C\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 \left (4 A b^2+14 a b B+a^2 (5 A+7 C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{21 d}+\frac {2 a (4 A b+7 a B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac {2 A (a+b \cos (c+d x))^2 \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{7 d}-\frac {1}{5} \left (\left (6 a A b+3 a^2 B+5 b^2 B+10 a b C\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=-\frac {2 \left (6 a A b+3 a^2 B+5 b^2 B+10 a b C\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 \left (14 a b B+7 b^2 (A+3 C)+a^2 (5 A+7 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{21 d}+\frac {2 \left (6 a A b+3 a^2 B+5 b^2 B+10 a b C\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 \left (4 A b^2+14 a b B+a^2 (5 A+7 C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{21 d}+\frac {2 a (4 A b+7 a B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac {2 A (a+b \cos (c+d x))^2 \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 4.37, size = 221, normalized size = 0.77 \[ \frac {2 \sqrt {\sec (c+d x)} \left (21 \sin (c+d x) \left (3 a^2 B+2 a b (3 A+5 C)+5 b^2 B\right )+5 \tan (c+d x) \left (a^2 (5 A+7 C)+14 a b B+7 A b^2\right )+5 \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (a^2 (5 A+7 C)+14 a b B+7 b^2 (A+3 C)\right )-21 \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (3 a^2 B+2 a b (3 A+5 C)+5 b^2 B\right )+15 a^2 A \tan (c+d x) \sec ^2(c+d x)+21 a (a B+2 A b) \tan (c+d x) \sec (c+d x)\right )}{105 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.68, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (C b^{2} \cos \left (d x + c\right )^{4} + {\left (2 \, C a b + B b^{2}\right )} \cos \left (d x + c\right )^{3} + A a^{2} + {\left (C a^{2} + 2 \, B a b + A b^{2}\right )} \cos \left (d x + c\right )^{2} + {\left (B a^{2} + 2 \, A a b\right )} \cos \left (d x + c\right )\right )} \sec \left (d x + c\right )^{\frac {9}{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{2} \sec \left (d x + c\right )^{\frac {9}{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 11.72, size = 947, normalized size = 3.29 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{2} \sec \left (d x + c\right )^{\frac {9}{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{9/2}\,{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )+A\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________